package com.spring.annotation_demo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class MyService01 {
	private String name;
	public MyService01(@Value("${service.myname}") String name) {
		this.name = name;
	}

	public void sayhello(){
		System.out.println("hello"+name);
	}
}
